home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / earcd / biz / swood / fw_font_.lha / FW_Font-e / FontLook-Auto.fw.long < prev    next >
Text File  |  1997-04-27  |  7KB  |  289 lines

  1. /* Here you get an overview about your fonts
  2.  © Heiko Schröder / 97/04/27 / Mail: age@thepentagon.com */
  3. R='0A'X
  4.  
  5. Address='FinalW'
  6. Options results
  7.  
  8. STATUS PORTNAME
  9. FW = result
  10. address = FW
  11.  
  12. SIGNAL ON BREAK_C
  13.  
  14. 'ShowMessage 2 0 "FontLook - Auto V2.72" "for Font-Directories..." "(©) Heiko Schröder - 97/04/27" ":-)" "Ok" "(-:"'
  15. 'ShowMessage 1 1 "A T T E N T I O N !" "The macro needs an empty document." "Clear the document?" "Yes" "Abort" ""'
  16. if result=2 then call BREAK_C
  17. Cleardoc Force
  18.  
  19. 'ShowMessage 2 0 "codes or layout" "" "" "codes" "layout" ""'
  20. cl=result
  21. 'ShowMessage 2 0 "Screen output?" "" "" "normal" "speed" ""'
  22. ba=result
  23.  
  24. /*----- REXXREQTOOLS -----*/
  25.  
  26. Temp = "ram:fonts"
  27. if ~show('L',"rexxreqtools.library") then do
  28.    if ~addlib('rexxreqtools.library',0,-30,0) then do
  29.       'ShowMessage 1 1 "Error...." "I need the RexxReqTools.library" " E N D ! !" "Okay" "" ""'
  30.       exit
  31.    end
  32. end
  33.  
  34. dir=rtfilerequest("FWFonts/SWOLFonts/",,"Select a directory...",,"rt_pubscrname=FinalWriterPubScreen rtfi_flags = freqf_nofiles")
  35. if dir="" then do
  36.    'ShowMessage 1 1 "No directory selected!" " E N D ! !" "" "Okay" "" ""'
  37.    exit
  38. end
  39. dir=d2c(34)||dir||d2c(34)
  40. address command 'list ' dir || ' to=' Temp || ' files lformat "%s%s"'
  41.  
  42. if OPEN('file',Temp,"R") then
  43. If Seek("file",0,"E")=0 then do
  44.    'ShowMessage 1 1 "Directory is empty!" " E N D ! !" "" "Okay" "" ""'
  45.    address "REXX"
  46.    close("file")
  47.    EXIT
  48. end
  49.  
  50. address "REXX"
  51. close("file")
  52. address command 'sort ' Temp Temp
  53. OPEN('file',Temp, "R")
  54.  
  55. address(FW)
  56. 'ShowMessage 1 0 "Do you need perforation signs?" "" "" "Yes" "No" ""'
  57. lm=result
  58. 'ShowMessage 1 0 "Whats next?" "" "" "save" "save + print" "print"'
  59. wgw=result
  60.  
  61. /*---------------------------*/
  62.  
  63. DO WHILE 1
  64.     FontName=ReadLn('file')
  65.     IF EOF('file') THEN do
  66.       address "REXX"
  67.       close('file')
  68.       call Ende
  69.    End
  70.  
  71.    /*minimize window*/
  72.    IF ba=2 THEN DO
  73.       status WINDOW
  74.       parse VAR result links oben width height minwidth minheight maxwidth maxheight
  75.       sizewindow minwidth minheight
  76.    End
  77.  
  78.    GetDocItemPrefs Decimal
  79.    Punkt=Result
  80.    If Punkt="Comma" then DocItemPrefs Decimal Period
  81.  
  82.    TextTool
  83.    Font FontName
  84.    a=RC
  85.    If a=0 then do                  /* Font?*/
  86.  
  87.       Type d2c(32)
  88.       BackSpace
  89.       status FontPath
  90.       FullFontName=result
  91.       pos = max(index(FullFontName,':'),lastpos('/',FullFontName))
  92.       IF (pos~=0) THEN
  93.           FontName=RIGHT(FullFontName, LENGTH(FullFontName)-pos)
  94.        END
  95.       IF ba=2 THEN View 20
  96.  
  97.       GraphicTool
  98.  
  99.       Pagesetup Pagetype A4 Orient Tall Top 0 Bottom 2.54 Left 0 Right 0
  100.       SectionSetup Top 2.54 Bottom 2.54 Inside 2 Outside 1
  101.       LinePrefs LineWt .5
  102.       DrawLine 1 2 3.5 20 3.5
  103.       DrawLine 1 2 26 20 26
  104.       If lm=1 then DrawLine 1 0.5 14.85 1 14.85
  105.  
  106.       TextTool
  107.       If cl=1 then do
  108.  
  109.          Do i=0 to 13
  110.             SetTab i*1.3+0.8 Right
  111.          End
  112.    
  113.          NameFont="FWDocs/Codes-" || FontName
  114.          Justify Center
  115.          Font Softsans
  116.          FontSize 18
  117.          Type FontName||R||R
  118.  
  119.          a=0
  120.  
  121.          DO w=1 to 15
  122.  
  123.             Font Softsans
  124.             FontSize 8
  125.             DO x=a+33 to a+46
  126.                 Type d2c(9) || x || d2c(32) || d2c(x)
  127.             END
  128.  
  129.             Type R
  130.  
  131.             Font FontName
  132.             FontSize 24
  133.             DO x=a+33 to a+46
  134.                 Type d2c(9)
  135.                Type d2c(x)
  136.             END
  137.  
  138.             Type R
  139.  
  140.             a=a+14
  141.  
  142.          END
  143.  
  144.          Font Softsans
  145.          FontSize 8
  146.          DO x=a+33 to a+45
  147.              Type d2c(9) || x || d2c(32) || d2c(x)
  148.          END
  149.  
  150.          Type d2c(9)||R
  151.  
  152.          Font FontName
  153.          FontSize 24
  154.          DO x=a+33 to a+45
  155.              Type d2c(9)
  156.             Type d2c(x)
  157.          END
  158.          Type d2c(9)||R
  159.          FontSize 12
  160.          Type d2c(9)||R
  161.          Font Softsans
  162.  
  163.          FontSize 8
  164.          Justify Right
  165.          Type Date(O)" - "FullFontName
  166.  
  167.       END
  168.  
  169.       If cl=2 then do
  170.  
  171.          Justify Center
  172.          NameFont="FWDocs/Layout-" || FontName
  173.          Font Softsans
  174.          FontSize 18
  175.          Type FontName||R
  176.  
  177.          Justify Left
  178.          Font FontName
  179.          FontSize 8
  180.          Type R||"This is 8-point type - not easy to read!"||R
  181.  
  182.          FontSize 9
  183.          Type "9-Point type is about the smallest readable size."||R
  184.  
  185.          FontSize 10
  186.          Type "With 10-point type, we have a normal text size."||R
  187.  
  188.          FontSize 12
  189.          Type "With some fonts, 12-point type is easier to read."||R
  190.  
  191.          FontSize 14
  192.          Type "14-point type is good for subheadings."||R
  193.  
  194.          FontSize 16
  195.          Type "For larger subheadings, try 16-point type."||R
  196.  
  197.          FontSize 18
  198.          Type "18-point type makes nice small headlines."||R
  199.  
  200.          FontSize 24
  201.          Type "24-point type is for medium headlines."||R
  202.  
  203.          FontSize 36
  204.          Type "36-point is for larger ones."||R
  205.  
  206.          FontSize 48
  207.          Type "48-point almost shouts!"||R||R
  208.  
  209.          FontSize 12
  210.          Font SoftSans
  211.          Type "NORMAL"||R
  212.  
  213.          FontSize 10
  214.          Font FontName
  215.          Type "ABCDEFGHIJKLMNOPQRSTUVWXYZ"||R
  216.          Type "abcdefghijklmnopqrstuvwxyz 1234567890 !@#$%^&*()-+=[]{}/:;,.?"||R
  217.          Type "The quick brown fox jumps over the lazy dog."||R||R||R
  218.  
  219.          Font SoftSans
  220.          Type "EXTENDED CHARACTERS"||R
  221.  
  222.          FontSize 10
  223.          Font FontName
  224.          j=0
  225.          Do i=1 to 4
  226.             Do k=128+j to 159+j
  227.                Type d2c(k)
  228.             End
  229.             Type R
  230.             j=j+32
  231.          End
  232.          Status BodyTextHeight
  233.          th=result
  234.          FG=26.24-2.113-th
  235.          FG=Trunc(FG*8/0.34)
  236.          FontSize FG
  237.          Type d2c(9)
  238.          Font SoftSans
  239.          FontSize 8
  240.          Type R
  241.          Justify Right
  242.          Type Date(O)" - "FullFontName
  243.       End
  244.  
  245.       call WH
  246.  
  247.       /* save */
  248.       If wgw~=3 then 
  249.          Save NameFont
  250.  
  251.       /* Save+print */
  252.       If wgw=2 then 
  253.          Print
  254.  
  255.       /* Nur print */
  256.       If wgw=3 then
  257.          Print
  258.  
  259.       Cleardoc force
  260.    END
  261.    else do
  262.       call WH
  263.       'ShowMessage 1 1 "FW cant display this font..." "Its a non-FW-font..." "" "Okay" "" ""'
  264.    end
  265. END
  266.  
  267. Ende:
  268.    address(FW)
  269.    If cl=1 then 'ShowMessage 2 1 "You can find the documents in the FWDocs-Drawer." "Recognizable on «Codes-.....«" "Thanx for use." "@-`-" "Please" ":-))"'
  270.    If cl=2 then 'ShowMessage 2 1 "You can find the documents in the FWDocs-Drawer." "Recognizable on «Layout-.....«" "Thanx for use." "@-`-" "Please" ":-))"'
  271.    Address command "delete ram:fonts QUIET"
  272.    EXIT
  273.  
  274. BREAK_C:
  275.    'ShowMessage 1 1 "Macro aborted..." "" "" "I know..." "" ""'
  276.    call WH
  277.    address "REXX"
  278.    CLOSE("file")
  279.    Address command "delete ram:fonts QUIET"
  280.    EXIT
  281.  
  282. WH:
  283.    If ba=2 then do
  284.       View
  285.       sizewindow width height
  286.    End
  287.    If Punkt="Comma" then DocItemPrefs DECIMAL Comma
  288. Return
  289.